//
//  CustomPageControl.h
//  ItemCell
//
//  Created by baoyin luo on 2019/11/7.
//  Copyright © 2019 baoyin luo. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger,PageControlDirectionType){
    PageControlDirectionMiddle = 0, //
    PageControlDirectionRight, //
    PageControlDirectionLeft //
};


@class CustomPageControl;
@protocol PageControlDelegate <NSObject>

@optional
-(void)pageControlClick:(CustomPageControl*)pageControl index:(NSInteger)index;

@end

/**
 自定义PageControl
 */
@interface CustomPageControl : UIControl

//其他点是高度的倍数,默认1
@property (nonatomic) NSInteger otherMultiple;

//当前点h是高度的倍数,默认2
@property (nonatomic) NSInteger currentMultiple;

/**
 控件位置,默认中间
 */
@property (nonatomic, assign) PageControlDirectionType type;

/**
 动画时长
 */
@property (nonatomic, assign) NSTimeInterval animationTime;

/*
 分页数量
 */
@property (nonatomic) NSInteger numberOfPages;

/*
 当前点所在下标
 */
@property (nonatomic) NSInteger currentPage;

/*
 点的大小
 */
@property (nonatomic) CGSize controlSize;

/*
 点的间距
 */
@property (nonatomic) NSInteger controlSpacing;

/*
 其他未选中点颜色
 */
@property (nonatomic, strong) UIColor *otherColor;

/*
 当前点颜色
 */
@property (nonatomic, strong) UIColor *currentColor;

/*
 当前点背景图片
 */
@property (nonatomic, strong) UIImage *currentBkImg;

/*
 其他点背景图片
 */
@property (nonatomic, strong) UIImage *otherBkImg;

/**
 回调Block
 */
@property (nonatomic, copy) void(^ChangePageBlock)(CustomPageControl *pageControl,NSInteger index);

/**
 代理Block
 */
@property (nonatomic,weak)  id<PageControlDelegate > delegate;

@end

NS_ASSUME_NONNULL_END
